Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

discord: add AttachmentOption unmarshalling #416

Merged
merged 1 commit into from
Jan 6, 2024

Conversation

Benbebop
Copy link
Contributor

@Benbebop Benbebop commented Jan 6, 2024

AttachmentOption isn't in UnknownCommandOption so it doesn't get unmarshalled properly.

func main() {
	var options discord.CommandOptions
	options.UnmarshalJSON([]byte(`[{"Type": 11, "Name": "attachment", "Description": "attachment"}]`))
	fmt.Println(reflect.TypeOf(options[0]))
}

*discord.UnknownCommandOption

@diamondburned diamondburned merged commit 3bbdae9 into diamondburned:v3 Jan 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants